#include <bits/stdc++.h>
using ll = long long;
using namespace std;

const int N = 2e5 + 5;
int t, n;
ll tot[N], a[N], lst, rec, pre[N];

int main()
{
	cin >> t;
	while(t--)
	{
		cin >> n;
		memset(tot, 0, sizeof(tot));
		for(int i = 1; i <= n; i++)
		{
			cin >> a[i];
			tot[a[i]]++;
			pre[i] = i - 1;
		}
		pre[0] = -1;
		sort(a + 1, a + 1 + n);
		lst = -1, rec = 0;
		for(int i = 0; i <= n; i++)
		{
			if(tot[i])
			{
				cout << rec + tot[i] << ' ';
				if(tot[i] > 1) pre[i] = lst, lst = i;
			}
			else
			{
				cout << rec << ' ';
				if(lst == -1 || tot[lst] < 2)
				{
					for(int j = i+1; j <= n; j++) cout << -1 <<' ';
					break;
				}
				rec += i - lst;
				tot[lst]--;
				while(lst != -1 && tot[lst] < 2) lst = pre[lst];
				pre[i] = lst;
				tot[i]++;
			}
		}
        cout << endl;
	}
	return 0;
}